﻿using System.IO;

namespace Devshed.Csv.Writing
{
    /// <summary>Represent the abstract definition of an CSV stream writer.</summary>
    public interface ICsvStreamWriter
    {
        /// <summary>Writes the CSV data into the specified stream.</summary>
        /// <typeparam name="T">Type of model to write onto the stream.</typeparam>
        /// <param name="stream">The stream.</param>
        /// <param name="rows">The rows.</param>
        /// <param name="definition">The definition.</param>
        void Write<T>(Stream stream, T[] rows, CsvDefinition<T> definition);
    }
}